package com.api.gbhg.daiyanlu.DataPrintCopyUtil;

import weaver.conn.RecordSet;

public class DataPrintCopy {
    public static RecordSet getRs(String requestId, String tbName) {
        RecordSet rs = new RecordSet();
        String sql = "SELECT jf.lcjlsqjlid,jf.lcbj,jf.lcjlsqjlid,dt2.bmyszcjjfl,dt2.dyzfjjfl,jf.ysnd,dt2.hjwy yszje,jf.sbdw,jf.xmmin,jf.jbr,jf.gkdw,\n" +
                     "cast(jf.sydw AS varchar(300)) as sydw \n" +
                     "FROM uf_jingfei_version jf JOIN  "+tbName+" bg \n" +
                     "ON jf.requestId = bg.requestId JOIN "+tbName+"_dt2 dt2 \n" +
                     "ON bg.id = dt2.mainid WHERE jf.sfky = 1 AND jf.lcjlsqjlid = "+requestId+" \n" +
                     "GROUP BY dt2.bmyszcjjfl,dt2.dyzfjjfl,jf.lcbj,jf.lcid,jf.ysnd,jf.lcjlsqjlid,jf.sbdw,jf.xmmin,jf.jbr,dt2.hjwy,jf.gkdw,\n" +
                     "cast(jf.sydw AS varchar(300))";
        rs.executeQuery(sql, new Object[0]);
        System.out.println(sql);
        return rs;
    }
}
